package com.plian.system.entity.sys.warning;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.io.Serializable;

@Data
@TableName("sys_warning_message_rule_config")
@ApiModel(value = "预警消息 规则配置")
public class WarningMessageRuleConfig implements Serializable {

    private static final long serialVersionUID = 1L;

    @JsonSerialize(using = ToStringSerializer.class)
    @TableId(value = "id", type = IdType.ASSIGN_ID)
    @ApiModelProperty(value = "主键")
    private Long id;

    @ApiModelProperty(value = "关系 1且 2或")
    private Integer ruleRelation;

    @JsonSerialize(using = ToStringSerializer.class)
    @ApiModelProperty(value = "亮灯配置id")
    private Long lightConfigId;

    @JsonSerialize(using = ToStringSerializer.class)
    @ApiModelProperty(value = "预警消息配置id")
    private Long configId;

    @JsonSerialize(using = ToStringSerializer.class)
    @ApiModelProperty(value = "因子id")
    private Long factorId;

    @ApiModelProperty(value = "条件 对应数学符号>、<、>=、<=、=、!=")
    private String conditionRule;

    @ApiModelProperty(value = "阈值范围")
    private String thresholdRange;

    @JsonSerialize(using = ToStringSerializer.class)
    @ApiModelProperty(value = "阈值因子id")
    private Long targetFactorId;

    @JsonSerialize(using = ToStringSerializer.class)
    @ApiModelProperty(value = "关联规则id")
    private Long linkId;

    @ApiModelProperty(value = "关联规则类型 1竖向 2横向，横向相当于()")
    private Integer linkType;

    @ApiModelProperty(value = "root节点 0否1是")
    private Integer isRoot;

}
